Communications over the Internet and various other data networks can be inherently unreliable. Consider a client communicating with a remote server over the Internet. If the client sends a request to the server that contains a command, the client may receive a response which indicates that the command was processed. Alternatively, the client may receive no response at all. If the client receives no response from the server, the client will be unsure as to which of the following is true: (1) the request was never received by the server, (2) the request was received by the server and the command is still being processed, or (3) the request was received by the server and the command has been processed, but the response was unsuccessfully transmitted to the client.
This can be problematic in a wide variety of applications. Consider, for example, that a client transmits a request to “charge John Smith's credit card $250,” but does not receive a response. In this scenario, the client may send the request again, which may cause the server to process the request twice, such that the customer is charged $500 for $250 worth of product. Alternatively, the client may not re-send the request, which may result in the customer paying nothing for $250 worth of product in the case that the server never received the request.